/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.myapp.struts.User.EditProfile;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.upload.FormFile;

/**
 *
 * @author Jaime
 */
public class EditProfileForm extends org.apache.struts.action.ActionForm {

    private int idUser;
    private String login;
    private String password;
    private String password2;
    private String name;
    private String surname;//apellidos
    private String email;
    private String location;//Ubicacion
    private FormFile avatar;//Direccion de la imagen dle avatar **Establecer maximo y minimo de tamaño**
    private byte availability;//Disponibilidad (Cantidad de ejercicios que estas dispuesto a corregir
    
    
    
    
    public FormFile getAvatar() {
        return avatar;
    }

    public void setAvatar(FormFile avatar) {
        this.avatar = avatar;
    }
    
    public byte getAvailability() {
        return availability;
    }

    public void setAvailability(byte availability) {
        this.availability = availability;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getIdUser() {
        return idUser;
    }

    public void setIdUser(int idUser) {
        this.idUser = idUser;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }
    

    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        /*if (getName() == null || getName().length() < 1) {
        errors.add("name", new ActionMessage("error.name.required"));
        // TODO: add 'error.name.required' key to your resources
        }*/
        return errors;
    }
}
